package br.com.pd.invocation;

import java.util.List;

import br.com.pd.app.server.ProducerIF;
import br.com.pd.messaging.ProducerRequestHandle;
import br.com.pd.messaging.RequestHandleIF;
import br.com.pd.messaging.Listener;
import br.com.pd.messaging.MessageFactory;
import br.com.pd.messaging.MessageIF;
import br.com.pd.messaging.Subject;


public class ProducerRequestor extends AbstractRequestor implements ProducerIF, Subject, Listener {
	
	

	public ProducerRequestor(String location, int port) {
		super(location, port);
	}

	@Override
	public MessageIF createMessage(List<Object> list) {
		return MessageFactory.createCotationMessage(list);
	}

	@Override
	public RequestHandleIF createRequestHandle() {		
		return new ProducerRequestHandle();
	}

	@Override
	public void requestCotation(List<Object> list) {
		super.invoke(super.managerHost, super.managerPort, list);		
	}


	
	
	

	


}
